#include <QtGui>
#include "resultItem.h"

ResultItem::ResultItem(QWidget *parent)
    : QPushButton(parent)
{
    num = new QLabel(" ", this);
    devLogo = new QLabel(" ", this);
    posDescrption = new QLabel(" ", this);

    QHBoxLayout *topLayout = new QHBoxLayout;
    topLayout->addWidget(num);
    topLayout->addWidget(devLogo);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addLayout(topLayout);
    mainLayout->addWidget(posDescrption);

    QSizePolicy policy = sizePolicy();
    policy.setHorizontalPolicy(QSizePolicy::Expanding);
    policy.setVerticalPolicy(QSizePolicy::Expanding);
    setSizePolicy(policy);

    policy = num->sizePolicy();
    policy.setHorizontalPolicy(QSizePolicy::Expanding);
    policy.setVerticalPolicy(QSizePolicy::Expanding);
    num->setSizePolicy(policy);

    policy = devLogo->sizePolicy();
    policy.setHorizontalPolicy(QSizePolicy::Expanding);
    policy.setVerticalPolicy(QSizePolicy::Expanding);
    devLogo->setSizePolicy(policy);

    policy = posDescrption->sizePolicy();
    policy.setHorizontalPolicy(QSizePolicy::Expanding);
    policy.setVerticalPolicy(QSizePolicy::Expanding);
    posDescrption->setSizePolicy(policy);

    setLayout(mainLayout);
}

void ResultItem::switchToObject()
{

}
